// arch-tag: 2401bda8-0a00-47b6-ac49-fed0ee1fe5dd
package de.yvert.jingle.tools;

import de.yvert.jingle.ToneMapper;
import de.yvert.jingle.hdr.HdrImage2D;
import de.yvert.jingle.ldr.LdrImage2D;

/**
 * @author Ulf Ochsenfahrt
 */
public class ClampToneMapper implements ToneMapper
{

public void map(HdrImage2D in, LdrImage2D out)
{
	float[] from = in.getData();
	byte[] to = out.getData();
	for (int i = 0; i < from.length; i++)
		to[i] = LdrImage2D.clamp(from[i]);
}

}
